<template>
	<view class="content-tabar">
		<view class="header">
			<view class="top55"></view>
			<view class="header-wd">我的</view>
			<view class="top30"></view>
			<view class="header-top flex-column">
				<view class="flex-row flex-item-center">
					<image class="header-avatar" src="../../static/user/header.png" mode="scaleToFill"></image>
					<view v-if="userInfo==null" class="header-login" @tap="toLogin">登录</view>
					<view v-if="userInfo!=null" class="flex-column header-c">
						<view class="header-name">王小明</view>
						<view class="flex-row flex-item-center header-txt">
							<image src="../../static/user/vip.png" mode="scaleToFill"></image>
							<view>普通会员</view>
						</view>
					</view>
				</view>
				<view class="top60"></view>
				<view class="header-foot flex-row flex-content-between">
					<view class="flex-column header-foot-left">
						<view>今日总营业额</view>
						<view>0</view>
					</view>
					<view class="flex-column header-foot-right">
						<view>今日预计收入</view>
						<view>0</view>
					</view>
				</view>
			</view>
			<view class="body-top">
				<view class="body-up">
					<view class="body-miney flex-row flex-content-between">
						<view class="flex-column body-price">
							<view>可提现收入</view>
							<view>0</view>
						</view>
						<view class="flex-column">
							<view class="flex-row body-mx flex-content-end flex-item-center" @tap="goMoneyLog">
								<view>明细</view>
								<image src="../../static/index/index-you.png" mode="scaleToFill"></image>
							</view>
							<view class="tixian" @tap="toWithdrawal">提现</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="sr">
			<view class="flex-column">
				<view class="not-has">
					<view class="not-top flex-column">
						<view class="flex-row flex-content-between">
							<view class="not-txt-1">我的收入</view>
							<!-- <view class="flex-row chakqb flex-item-center">
								<view>查看全部</view>
								<image src="../../static/index/index-you.png" mode="scaleToFill"></image>
							</view> -->
						</view>
						<view class="flex-column not-data" v-if="userInfo==null">
							<image src="../../static/user/wsj.png" mode="scaleToFill"></image>
							<view>暂无数据</view>
						</view>
						<view class="flex-column data-top" v-if="userInfo!=null">
							<view class="flex-row flex-content-between">
								<view class="flex-column ones-list">
									<view>总营业额</view>
									<view>362556.36</view>
								</view>
								<view class="flex-column ones-list">
									<view>总收入</view>
									<view>362556.36</view>
								</view>
							</view>
							<view class="flex-row flex-content-between ones-top">
								<view class="flex-column ones-list">
									<view>合伙人收入</view>
									<view>362556.36</view>
								</view>
								<view class="flex-column ones-list">
									<view class="flex-row flex-item-center sx-you" @tap="toPidMoney">
										<view>推荐收入</view>
										<image src="../../static/user/sx-you.png" mode="scaleToFill"></image>
									</view>
									<view>362556.36</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view v-if="userInfo!=null" class="action">
					<view class="action-top flex-column">
						<view class="flex-row flex-content-between ones" @tap="toBankList">
							<view class="flex-row list-img-left">
								<image src="../../static/user/bank.png" mode="scaleToFill"></image>
								<view>银行卡管理</view>
							</view>
							<view class="flex-row list-img-right">
								<image src="../../static/index/index-you.png" mode="scaleToFill"></image>
							</view>
						</view>
						<view class="flex-row flex-content-between ones" @tap="toUserInfo">
							<view class="flex-row list-img-left">
								<image src="../../static/user/user-icon.png" mode="scaleToFill"></image>
								<view>个人信息</view>
							</view>
							<view class="flex-row list-img-right">
								<image src="../../static/index/index-you.png" mode="scaleToFill"></image>
							</view>
						</view>
						<view class="flex-row flex-content-between ones" @tap="loginOut">
							<view class="flex-row list-img-left">
								<image src="../../static/user/tc.png" mode="scaleToFill"></image>
								<view>退出登录</view>
							</view>
							<view class="flex-row list-img-right">
								<image src="../../static/index/index-you.png" mode="scaleToFill"></image>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				userInfo:{},//用户信息
			}
		},
		methods:{
			//跳转到提现
			toWithdrawal(){
				uni.navigateTo({
					url:'/pages/user/withdrawal'
				})
			},
			//跳转到收入明细
			goMoneyLog(){
				uni.navigateTo({
					url:'/pages/user/money_log'
				})
			},
			//跳转到银行列表
			toBankList(){
				uni.navigateTo({
					url:'/pages/bank/bank_list'
				})
			},
			//跳转到登录
			toLogin(){
				uni.navigateTo({
					url:'/pages/user/login'
				})
			},
			//跳转到个人信息
			toUserInfo(){
				uni.navigateTo({
					url:'/pages/user/user_info'
				})
			},
			//登出
			loginOut(){
				uni.showModal({
					title:"提示",
					content:"确认要退出登录吗？",
					success(res) {
						if(res.confirm){
							
						}
					}
				})
			},
			//跳转到推荐收入
			toPidMoney(){
				uni.navigateTo({
					url:'/pages/user/pid_money'
				})
			}
		}
	}
</script>

<style lang="scss">
	.ones{
		margin-bottom: 64rpx;
	}
	.list-img-right{
		>image{
			width: 14rpx;
			height: 24rpx;
		}
	}
	.list-img-left{
		>image{
			width: 44rpx;
			height: 44rpx;
		}
		>view{
			font-size: 28rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
			margin-left: 20rpx;
		}
	}
	.action-top{
		padding-top: 32rpx;
		margin-left: 20rpx;
		margin-right: 30rpx;
	}
	.action{
		width: 690rpx;
		height: 312rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		opacity: 1;
		margin-top: 30rpx;
		/* #ifdef H5 */
		margin-bottom: 120rpx;
		/* #endif */
		/* #ifndef H5 */
		margin-bottom: 20rpx;
		/* #endif */
	}
	.sx-you{
		>view{
			font-size: 26rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #666666;
		}
		>image{
			width: 23rpx;
			height: 23rpx;
			margin-left: 10rpx;
		}
	}
	.ones-top{
		margin-top: 60rpx;
	}
	.data-top{
		margin-top: 50rpx;
		margin-right: 111rpx;
	}
	.ones-list{
		>view:nth-child(1){
			font-size: 26rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #666666;
		}
		>view:nth-child(2){
			font-size: 32rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #333333;
			margin-top: 12rpx;
		}
	}
	.not-data{
		>image:nth-child(1){
			width: 263rpx;
			height: 162rpx;
			margin-top: 63rpx;
			margin-left: 174rpx;
		}
		>view{
			font-size: 24rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
			margin-top: 20rpx;
			text-align: center;
		}
	}
	.chakqb{
		>view:nth-child(1){
			font-size: 24rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
		}
		>image{
			width: 12rpx;
			height: 20rpx;
			margin-left: 10rpx;
		}
	}
	.not-txt-1{
		font-size: 30rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #333333;
	}
	.not-top{
		padding-top: 29rpx;
		margin-left: 30rpx;
		margin-right: 30rpx;
	}
	.not-has{
		width: 690rpx;
		height: 419rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		opacity: 1;
		margin-top: 111rpx;
		background-color: #FFFFFF;
	}
	.sr{
		width: 690rpx;
		margin-left: 30rpx;
		margin-right: 30rpx;
	}
	.tixian{
		width: 110rpx;
		height: 46rpx;
		background: #F9E3AD;
		border-radius: 23rpx 23rpx 23rpx 23rpx;
		opacity: 1;
		text-align: center;
		line-height: 46rpx;
		font-size: 28rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #8D6400;
		margin-top: 39rpx;
	}
	.body-miney{
		margin-left: 30rpx;
		margin-right: 30rpx;
		padding-top: 30rpx;
		padding-bottom: 33rpx;
	}
	.body-mx{
		text-align: end;
		>view:nth-child(1){
			font-size: 24rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;
		}
		>image{
			width: 12rpx;
			height: 20rpx;
			margin-left: 10rpx;
			// margin-top: 35rpx;
		}
	}
	.body-price{
		>view:nth-child(1){
			font-size: 28rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
		}
		>view:nth-child(2){
			font-size: 38rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #333333;
			margin-top: 35rpx;
		}
	}
	.body-up{
		width: 690rpx;
		// height: 186rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		opacity: 1;
		margin-top: 55rpx;
	}
	.body-top{
		width: 690rpx;
		margin-left: 30rpx;
		margin-right: 30rpx;
	}
	.header-foot-right{
		>view:nth-child(1){
			font-size: 26rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #8D6400;
		}
		>view:nth-child(2){
			font-size: 36rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #333333;
			text-align: center;
			margin-top: 20rpx;
		}
	}
	.header-foot-left{
		>view:nth-child(1){
			font-size: 26rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #8D6400;
		}
		>view:nth-child(2){
			font-size: 36rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #333333;
			text-align: center;
			margin-top: 20rpx;
		}
	}
	.header-foot{
		margin-left: 125rpx;
		margin-right: 124rpx;
	}
	.header-c{
		margin-left: 30rpx;
	}
	.header-name{
		font-size: 34rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #333333;
	}
	.header-txt{
		margin-top: 14rpx;
		>view{
			font-size: 26rpx;
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: $default-button-end-color;
		}
		>image{
			width: 32rpx;
			height: 28rpx;
		}
	}
	.header-login{
		font-size: 34rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #333333;
		margin-left: 30rpx;
	}
	.header-avatar{
		width: 106rpx;
		height: 106rpx;
		border-radius: 53rpx;
	}
	.header-top{
		margin-left: 30rpx;
		margin-right: 30rpx;
	}
	.header-wd{
		font-size: 34rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #333333;
		text-align: center;
	}
	.header{
		width: 750rpx;
		height: 571.54rpx;
		/* #ifdef MP */
		background-image: url('http://ws.facai.maowenke.cn/img/userbj.png');
		/* #endif */
		/* #ifndef MP */
		background-image: url('../../static/user/userbj.png');
		/* #endif */
		background-size: 100%;
	}
</style>